<?php
//redis 排序功能
require_once "./predis/autoload.php";

$conf=[
	'host'=>'localhost'
];

$redis=new Predis\Client($conf);

$redis->select(3);

$res=$redis->sort('mylist',[
	'by'=>'weight_*',
	'limit'=>array(0,10),
	'get'=>array('value_*','#'),
	'sort'=>'asc',
	'alpha'=>'true',
	'store'=>'result'
]);

echo "<pre>";
print_r($redis->lrange('result',0,-1));
?>